package com.lzkj.baotouhousingfund.ui.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;

import com.lzkj.baotouhousingfund.R;
import com.lzkj.baotouhousingfund.base.BaseActivity;
import com.lzkj.baotouhousingfund.presenter.LoginPresenter;
import com.lzkj.baotouhousingfund.presenter.contract.LoginContract;
import com.lzkj.baotouhousingfund.utils.Code;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * @author lx
 * @description 登录页面
 * @date 2018-3-12 10:35:04
 */

public class LoginActivity extends BaseActivity<LoginPresenter> implements LoginContract.View {


    @BindView(R.id.img_verification_code)
    ImageView mImgVerificationCode;

    @Override
    protected void initInject() {
        getActivityComponent().inject(this);
    }

    @Override
    protected int getLayout() {
        return R.layout.activity_login;
    }

    @Override
    protected void initEventAndData() {

    }

    @Override
    public void showError(String msg) {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mImgVerificationCode.setImageBitmap(Code.getInstance().createBitmap());
    }

    public static void start(Context context) {
        Intent intent = new Intent(context, LoginActivity.class);
        context.startActivity(intent);
    }
}
